package com.itheima.service.impl;

import com.itheima.service.AccountService;
import org.springframework.stereotype.Service;

@Service
public class AccountServiceImpl implements AccountService {

    @Override
    public String findAll() {
        //System.out.println("findAll......");
        return "result: 查询结果";
    }
    @Override
    public void insert(String data) {
        //当前方法确实出现的异常，但是方法内存已经处理了，异常就无法向外抛出，导致spring aop异常通知
        //无法捕获这个异常
        try {
            int i = 1/0;
            System.out.println("insert......" + data);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public void update() {
        System.out.println("update......");
    }

    @Override
    public void delete() {
        System.out.println("delete......");
    }
}
